// src/components/todo-list.vue

<template>
    <ul>
        <li v-for="(item, index) in items">
            <!-- 绑定在 <slot > 元素上的 attribute 被称为插槽 prop -->
            <slot :item="item"></slot>
        </li>
    </ul>
</template>

<script lang="ts">
import { defineComponent, reactive } from "vue";

export default defineComponent({
    name: 'TodoList',
    setup() {
        const items = reactive(['Feed a cat', 'Buy milk'])

        return {
            items
        }
    }
})
</script>